package com.dong.auth.security;

import com.dong.auth.security.matcher.AntPathRequestMatcher;
import com.dong.auth.security.matcher.RequestMatcher;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 构建安全过滤器链
 *
 * @author zhaodongchao
 * @date 2021/10/12 23:42
 * @version V1.0
 */
public class DongSecurityFilterChainBuilder {
    private final static RequestMatcher requestMatcher = new AntPathRequestMatcher();

    public static DongSecurityFilterChain build(){
        return new DefaultDongSecurityFilterChain(requestMatcher,null);
    }

    public static DongSecurityFilterChain createEmptyForUrl(String url){
        return new DefaultDongSecurityFilterChain(new AntPathRequestMatcher(url), Collections.emptyList()) ;
    }
}
